package com.walker.spring.main;

import com.walker.spring.config.Config;
import com.walker.spring.service.UseHelloService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author qinmu
 * @create 2017-10-10-22:58
 */
public class Main {

    public static void main(String[] args) {
        /**
         * AnnotationConfigApplicationContext:spring容器
         */
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class);
        UseHelloService useHelloService = context.getBean(UseHelloService.class);
        System.out.println(useHelloService.sayHello("world"));
        context.close();
    }
}
